package com.novel.common.vo;

import com.novel.pojo.novel.Novel;
import com.novel.utils.NumFormatUtils;
import lombok.Data;

/**
 * 小说推荐数、点击量、打赏数
 */
@Data
public class NovelInfo {

    private String novelRecommend;//小说推荐数
    private String novelClick;//小说点击量
    private String novelReward;//小说打赏数

    public static NovelInfo parseNovelInfo(Novel novel) {
        NovelInfo novelInfo = new NovelInfo();
        novelInfo.setNovelClick(NumFormatUtils.parseNumber(novel.getNovelClick()));
        novelInfo.setNovelRecommend(NumFormatUtils.parseNumber(novel.getNovelRecommend()));
        novelInfo.setNovelReward(NumFormatUtils.parseNumber(novel.getRewardAmount()));
        return novelInfo;
    }

}